import connexion
import six

from swagger_server.models.keywords_result import KeywordsResult  # noqa: E501
from swagger_server import util
import os,sys
sys.path.append('./src')
import keyword_extraction
import word_cloud
print("Ready")

def extract_keyword(content, need_split=None):  # noqa: E501
    """keywords extraction

     # noqa: E501

    :param content: 可同时输入多个句子
    :type content: str
    :param need_split: 
    :type need_split: bool

    :rtype: KeywordsResult
    """
    return 'do some magic!'


def extract_keywords(contents=None):  # noqa: E501
    """keywords extraction

     # noqa: E501

    :param contents: 可同时输入多个句子
    :type contents: List[]

    :rtype: KeywordsResult
    """
    result = keyword_extraction.get_keywords(contents)
    return result

def get_cloud(contents=None):  # noqa: E501
    """Returns word cloud image

     # noqa: E501

    :param contents: 可同时输入多个句子
    :type contents: List[]

    :rtype: file
    """
    return word_cloud.get_image(contents)